<!--  -->
<template>
  <div>增加机构
  
    <el-form
    ref="ruleFormRef"
    label-width="auto"
    label-position="top"
  >

  <el-row :gutter="50">
  {{ ruleForm }}

    <el-col :span="12">
        <el-form-item label="机构名称" prop="name">
      <el-input v-model="ruleForm.name" />
    </el-form-item>
    <el-form-item label="地址" prop="address">
      <el-input v-model="ruleForm.address" />
    </el-form-item>
  

    <el-form-item label="营业执照" prop="address">
     
     <Upload v-model="ruleForm.certificate"></Upload>
      
    </el-form-item>

    </el-col>
    <el-col :span="12">
    
       
    </el-col>
    <el-form-item label="" prop="name">
      <el-button @click="submit" type="primary">提交</el-button>
    </el-form-item>
  </el-row>


  </el-form>
  </div>
</template>

<script lang='ts' setup>
import { reactive,toRefs,ref,onMounted} from 'vue'
import { useRouter } from 'vue-router'
import Upload from '../../components/upload/Upload.vue';
const router = useRouter()

const ruleForm = reactive({
    name: '',
    certificate: '',
    address: ''

})

const getData=()=>{

  //调接口

  let data={name:'aa',certificate:'upload/2025/8/11/20250811102221729.png',address:'beijing'};

  Object.assign(ruleForm,data);



}
getData();

const submit=()=>{

  router.push({
    path: '/company/list',
  })

}
</script>
<style scoped>
</style>